package com.hengyue.common.core.criteria;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;

@Getter
@Setter
public class BaseCriteria {
    private int pageNum = 1;
    private int pageSize = 10;
    /**
     * 构建分页查询参数
     */
    public Pageable getPageable() {
        return PageRequest.of(this.pageNum, this.pageSize);
    }
}
